const { Switch } = require("../lib/types");

module.exports = {
    name: "ngx_http_uwsgi_module",
    map: {
        uwsgi_bind: [[Switch, String], , ["http", "server", "location"]],
        uwsgi_buffer_size: [String, "4k|8k", ["http", "server", "location"]],
        uwsgi_buffering: [Switch, true, ["http", "server", "location"]],
        uwsgi_buffers: [String, "8 4k|8k", ["http", "server", "location"]],
        uwsgi_busy_buffers_size: [String, "8k|16k", ["http", "server", "location"]],
        uwsgi_cache: [[Switch, String], false, ["http", "server", "location"]],
        uwsgi_cache_background_update: [Switch, false, ["http", "server", "location"]],
        uwsgi_cache_bypass: [String, , ["http", "server", "location"]],
        uwsgi_cache_key: [String, , ["http", "server", "location"]],
        uwsgi_cache_lock: [Switch, false, ["http", "server", "location"]],
        uwsgi_cache_lock_age: [String, "5s", ["http", "server", "location"]],
        uwsgi_cache_lock_timeout: [String, "5s", ["http", "server", "location"]],
        uwsgi_cache_max_range_offset: [Number, , ["http", "server", "location"]],
        uwsgi_cache_methods: [String, "GET HEAD", ["http", "server", "location"]],
        uwsgi_cache_min_uses: [Number, 1, ["http", "server", "location"]],
        uwsgi_cache_path: [String, , "http"],
        uwsgi_cache_purge: [String, , ["http", "server", "location"]],
        uwsgi_cache_revalidate: [Switch, false, ["http", "server", "location"]],
        uwsgi_cache_use_stale: [[Switch, String], false, ["http", "server", "location"]],
        uwsgi_cache_valid: [String, , ["http", "server", "location"]],
        uwsgi_connect_timeout: [String, "60s", ["http", "server", "location"]],
        uwsgi_force_ranges: [Switch, false, ["http", "server", "location"]],
        uwsgi_hide_header: [String, , ["http", "server", "location"]],
        uwsgi_ignore_client_abort: [Switch, false, ["http", "server", "location"]],
        uwsgi_ignore_headers: [String, , ["http", "server", "location"]],
        uwsgi_intercept_errors: [Switch, false, ["http", "server", "location"]],
        uwsgi_limit_rate: [String, "0", ["http", "server", "location"]],
        uwsgi_max_temp_file_size: [String, "1024m", ["http", "server", "location"]],
        uwsgi_modifier1: [Number, 0, ["http", "server", "location"]],
        uwsgi_modifier2: [Number, 0, ["http", "server", "location"]],
        uwsgi_next_upstream: [[Switch, String], "error timeout", ["http", "server", "location"]],
        uwsgi_next_upstream_timeout: [String, 0, ["http", "server", "location"]],
        uwsgi_next_upstream_tries: [Number, 0, ["http", "server", "location"]],
        uwsgi_no_cache: [String, , ["http", "server", "location"]],
        uwsgi_param: [String, , ["http", "server", "location"]],
        uwsgi_pass: [String, , ["location", "if"]],
        uwsgi_pass_header: [String, , ["http", "server", "location"]],
        uwsgi_pass_request_body: [Switch, true, ["http", "server", "location"]],
        uwsgi_pass_request_headers: [Switch, true, ["http", "server", "location"]],
        uwsgi_read_timeout: [String, "60s", ["http", "server", "location"]],
        uwsgi_request_buffering: [Switch, true, ["http", "server", "location"]],
        uwsgi_send_timeout: [String, "60s", ["http", "server", "location"]],
        uwsgi_socket_keepalive: [Switch, false, ["http", "server", "location"]],
        uwsgi_ssl_certificate: [String, , ["http", "server", "location"]],
        uwsgi_ssl_certificate_key: [String, , ["http", "server", "location"]],
        uwsgi_ssl_ciphers: [String, "DEFAULT", ["http", "server", "location"]],
        uwsgi_ssl_conf_command: [String, , ["http", "server", "location"]],
        uwsgi_ssl_crl: [String, , ["http", "server", "location"]],
        uwsgi_ssl_name: [String, "host from uwsgi_pass", ["http", "server", "location"]],
        uwsgi_ssl_password_file: [String, , ["http", "server", "location"]],
        uwsgi_ssl_protocols: [String, "TLSv1 TLSv1.1 TLSv1.2", ["http", "server", "location"]],
        uwsgi_ssl_server_name: [Switch, false, ["http", "server", "location"]],
        uwsgi_ssl_session_reuse: [Switch, true, ["http", "server", "location"]],
        uwsgi_ssl_trusted_certificate: [String, , ["http", "server", "location"]],
        uwsgi_ssl_verify: [Switch, false, ["http", "server", "location"]],
        uwsgi_ssl_verify_depth: [Number, 1, ["http", "server", "location"]],
        uwsgi_store: [[Switch, String], false, ["http", "server", "location"]],
        uwsgi_store_access: [String, "user:rw", ["http", "server", "location"]],
        uwsgi_temp_file_write_size: [String, "8k|16k", ["http", "server", "location"]],
        uwsgi_temp_path: [String, "uwsgi_temp", ["http", "server", "location"]]
    }
};